Secure Escrow Service

ABSTRACT

A method of restoring confidential information items of a first device to a second device by using a set of servers. The method generates a public and private key pair and ties the private key to the hash of executable code of the servers at the time of generating the public and private keys. The method receives the encrypted confidential information items in a secure object which is encrypted with a user-specific key and the public key. The method only provides the confidential information to the second device when the second device provides the same user-specific key as the key that encrypts the secure object and the hash of the executable code of the servers at the time of accessing the private key to decrypt the secure object matches the hash of the executable code running on the servers at the time of generating the private key.

BACKGROUND

Some electronic devices consolidate various types of confidentialinformation such as passwords, account numbers, credit card numbers,personal identification numbers for bank accounts, private keys, etc.,in one place referred to as a keychain and make them accessible througha master password. The passwords stored in a keychain include passwordsfor websites, e-mail accounts, file transfer protocol (FTP) servers,wireless networks, encrypted disk images, private keys, certificates,secure notes, etc.

Some electronic devices provide a default keychain, which is unlocked onlogin by the user's login password. The user can change the password toadd security at the expense of the additional steps required to enterthe password. When a user accesses any keychain-aware application, thekeychain provides the password so the user does not have to type thepassword. A user can create different keychains to store passwords andconfidential information for different purposes, e.g., one for work, onefor school, and one for online shopping.

In order to protect the confidential information in a keychain, thekeychain or each item in the keychain is encrypted with a key sometimesreferred to as class keys. The class keys are then stored in a datastructure referred to as a keybag. The keybag can be backed up at aremote storage location such as another computer or on a network such asthe Internet. The backup copy can be used to restore the keybag to thedevice. To maximize the protection of the keybag, the backed up keybagfor each device is also encrypted with a unique device identifier (UID)such as advanced encryption standard (AES) key of the device prior tobeing backed up in the storage outside the device. This protects thekeybag of a device to be stolen and used on another device.

FIG. 1 illustrates a system that backs up the keybag of a user deviceaccording to prior art. As shown, the keybag (or an encrypted keybag) ofuser device 1 105 is further encrypted by the UID of device 1 (UID 1)and is sent (as shown by encircled 1) to network 115 for storage in thenetwork storage 120. When user device 1 105 requires retrieving theencrypted keybag, the keybag is sent (as shown by encircled 2) to userdevice 1 105. User device 1 105 uses its own UID (UID 1) to decrypt thekeybag.

As often happens, electronic devices are lost, stolen, or are simplyreplaced. It is desirable to restore the keybag of a user from oneelectronic device to another electronic device. However, since thekeybag of user device 1 is encrypted with the UID of user device 1, thekeybag cannot be decrypted (as shown by encircled 3) by user device 2110 which has a different UID (UID 2) and does not have access to theUID of device 1.

BRIEF SUMMARY

In some embodiments, each item in a device keychain is encrypted with aclass key. The class keys are stored in a structure referred to as akeybag. The keybag and the keychain of a first device are backed up innetwork storage and are restored to a second device only when the seconddevice is properly authenticated. The keybag and/or the keychain areencrypted by a recovery key and stored in network storage. The recoverykey in some embodiments is a strong key that is generated at the time ofthe device set up.

The recovery key is then encrypted by using an escrow key to create arecovery binary large object (blob). The escrow key is generated basedon one or more user-specific information items known to the user of thedevice. The user-specific information items include one or more itemssuch as username, password, and answer to secret questions that areprovided by the user.

The recovery blob is then encrypted by a public key of a set of highlysecure servers to create an escrow blob. The escrow blob is then sent tothe network for backup storage. When a second device requests toretrieve the backed up keybag or keychain, the recovery key is sent tothe requesting device only when the requesting device is properlyauthenticated. The network sends the escrow blob (that contains therecovery blob) to the set of highly secure servers that have the privatekey corresponding to the public key that encrypts the recovery blob.

The secure servers then use their private key to decrypt the escrowblob. In order to ensure that the secure servers are not tampered with,when the public and private keys are generated by the secure servers,the hash of the executable code of the secure servers is tied to theprivate key for access control. When the secure servers attempt to usethe private key at a later time to decrypt the escrow blob, the privatekey becomes inaccessible if the hash of the executable code of thesecure servers at that time does not match the hash of the executablecode when the public and private keys were generated.

In addition, the secure servers operate in groups that cannot exceed amaximum number and processing the requests from each device is alwaysassigned to a particular group of secure servers. Assigning each userdevice to a particular group of secure servers and setting a maximumnumber for the secure servers prevents duplicating the secure servers tomake a brute force attempt to decrypt the escrow blob to get therecovery blob.

Once the escrow blob is decrypted by using the private key, the secureservers request the second device to provide the escrow key to decryptthe recovery blob. The device asks the user to provide the user-specificinformation that was used to generate the escrow key for the firstdevice. If the user of the second device provides the right answers, thesecure servers can use the resulting escrow key to decrypt the recoveryblob to get the recovery key. The recovery key is sent to the seconddevice to restore the keychain of the first device to the second device.However, if the escrow key is invalid, the secure servers allow apredetermined number of retries in some embodiments. If the user doesnot provide the right answers after the predetermined number of reties,the recovery blob is irrevocably locked in some embodiments. In otherembodiments, the secure servers start a timeout that geometricallyincreases after each failed attempt in order to prevent brute forceattempts to try different escrow keys by a malicious device.

The preceding Summary is intended to serve as a brief introduction tosome embodiments of the invention. It is not meant to be an introductionor overview of all inventive subject matter disclosed in this document.The Detailed Description that follows and the Drawings that are referredto in the Detailed Description will further describe the embodimentsdescribed in the Summary as well as other embodiments. Accordingly, tounderstand all the embodiments described by this document, a full reviewof the Summary, Detailed Description and the Drawings is needed.Moreover, the claimed subject matters are not to be limited by theillustrative details in the Summary, Detailed Description and theDrawings, but rather are to be defined by the appended claims, becausethe claimed subject matters can be embodied in other specific formswithout departing from the spirit of the subject matters.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features of the invention are set forth in the appendedclaims. However, for purpose of explanation, several embodiments of theinvention are set forth in the following figures.

FIG. 1 illustrates a system that backs up the keybag of a user deviceaccording to prior art.

FIG. 2 illustrates an example of a keychain used in an electronicdevice.

FIG. 3 illustrates an example of a keybag used in an electronic device.

FIG. 4 conceptually illustrates a high-level diagram of a system forbacking up the confidential information of a device and retrieving theconfidential information for a different device in some embodiments ofthe invention.

FIG. 5 conceptually illustrates a process for generating a keychain insome embodiments of the invention.

FIG. 6 conceptually illustrates a process for backing up theconfidential information of a device in some embodiments of theinvention.

FIG. 7 conceptually illustrates a system for creating and backing upconfidential information of a user device in some embodiments of theinformation.

FIG. 8 conceptually illustrates the keybag which is encrypted by therecovery key to create the encrypted keybag in some embodiments of theinvention.

FIG. 9 conceptually illustrates the recovery key which is encrypted bythe escrow key to create the recovery object which is in turn encryptedby the public key of the HSMs to create the escrow object in someembodiments of the invention.

FIG. 10 conceptually illustrates a system for receiving the escrowobject from a user device, storing the escrow object, and retrieving therecovery key encrypted by the escrow object to another user device insome embodiments of the invention.

FIG. 11 conceptually illustrates a process that a network uses to storethe confidential information of a user device in some embodiments of theinvention.

FIG. 12 conceptually illustrates a process for creating a public andprivate key pair by the secure escrow service in some embodiments of theinvention.

FIG. 13 conceptually illustrates different modules of the secure escrowservice for generating the public and private key pair in someembodiments of the invention.

FIG. 14 conceptually illustrates a process for a network that storesescrow blob to receive a request from a user device for retrieving thebacked up confidential information of another user device.

FIG. 15 conceptually illustrates a process for providing the recoverykey of a user device to a different user device.

FIG. 16 conceptually illustrates a process for requesting and receivingthe backed up keychain and keybag of a user device by a different userdevice.

FIG. 17 conceptually illustrates the recovery key delivery system of thesecure escrow service in some embodiments of the invention.

FIG. 18 conceptually illustrates a keychain/keybag recovery system of auser device in some embodiments of the invention.

FIG. 19 conceptually illustrates examples of valid and invalidconfigurations for a pod HSMs with maximum of three allowed HSMs in someembodiments of the invention.

FIG. 20 conceptually illustrates a process for determining whether anHSM pod can process a request from a user device.

FIG. 21 is an example of an architecture of such a mobile computingdevice in some embodiments of the invention.

FIG. 22 conceptually illustrates an electronic system with which someembodiments of the invention are implemented.

DETAILED DESCRIPTION

In the following detailed description of the invention, numerousdetails, examples, and embodiments of the invention are set forth anddescribed. However, it will be clear and apparent to one skilled in theart that the invention is not limited to the embodiments set forth andthat the invention may be practiced without some of the specific detailsand examples discussed.

In order to protect the confidential information, the keychain isencrypted on the user device. Different embodiments provide differentprotections for the keychain. In some embodiments, each item in akeychain is encrypted with a class key. In these embodiments, eachconfidential information item in a keychain is classified to belong to aparticular class and is encrypted with the key for the particular class.The collection of class keys is referred to as a keybag. In someembodiments, some or all class keys are device-dependent. In someembodiments, a random item key is generated for each password in thekeychain. The item key is a strong encryption key such as an advancedencryption standard (AES) 128 bit or 192 bit or 256 bit encryption key.The item key is used to encrypt the corresponding password. Theencrypted password is then further encrypted with the class key.

FIG. 2 illustrates an example of a keychain 200 used in an electronicdevice. As shown, the keychain in this example stores several encryptedpasswords 205, a PIN 210, and an account number 215. As described above,in some embodiments each password in the keychain is encrypted with aclass key. In other embodiments, each password is first encrypted withan item key and then with a class key.

FIG. 3 illustrates an example of a keybag 300 used in an electronicdevice. As shown, the keybag includes the class keys 305 which are usedto encrypt and decrypt confidential information in the keychain 200.

The keychain and the keybag are encrypted and backed up at a remotestorage location such as another computer or on a network such as theInternet. The backup copies are used to restore the keychain or thekeybag to the device. Some embodiments provide a mechanism to back upthe keybag and keychain of a user device and retrieve them to anotherdevice after ensuring that the two devices belong to the same user.

In this Specification several embodiments of the invention are describedby referencing both keychains and keybags. As described above, a keybagis a collection of class keys that are used to encrypt confidentialitems in a keychain. The embodiments of the invention, however, are notlimited to or require using a keybag or encrypting every password in thekeychain with a class key. For instance, the whole keychain in someembodiments is encrypted with an individual key. For these embodiments,any reference to a keybag should be understood to be referring to thisindividual key.

In addition, several embodiments are described below where the keybag isencrypted with a recovery key that is e.g., generated during the deviceset up. The encrypted keybag is then stored in network storage outsidethe device. In order to protect the recovery key, the recovery key isencrypted with an escrow key to create a recovery object or recoverylarge binary object (blob). The recovery blob is encrypted with thepublic key of a set of secured servers to generate an escrow blob (orescrow object), which is stored in network storage. The term escrow blobor escrow object is used in some of the following examples to refer tothe encrypted data that is saved on the network storage to protect thekey that encrypts the device confidential information such as thekeybag. Using such a recovery key is, however, not the only way ofprotecting a keybag. In some embodiments, the keybag is stored in thenetwork storage by using a backup password that is received from theuser through a user interface. Also, as discussed above, the keybag canbe protected with a hardware specific key. In some embodiments, theescrow key is replaced by an escrow password. For example, the escrowobject would then be a combination of the recovery key and arecovery/escrow password, and the combination would be encrypted to theHSM's public key.

FIG. 4 conceptually illustrates a high-level diagram of a system forbacking up the confidential information of a device and retrieving theconfidential information for a different device in some embodiments ofthe invention. As shown, the encrypted confidential information ofdevice 1 405 is sent (as shown by encircled 1) to network 415 for backup to network storage 420. The encrypted confidential informationincludes, e.g., the keybag that is encrypted with a strong recovery key.The recovery key is also encrypted with a user-specific escrow key and aprivate key of a set of secure servers 490 to generate an escrow blob(escrow object) and stored in the network storage 420 (as shown by theencircled 2).

The network 415 receives (as shown by encircled 3) a request at a latertime to restore the confidential information of device 1 405 to device 2410. For instance, the user of device 1 may have purchased device 2 410(e.g., when device 1 is lost or being replaced) and wishes to restorethe keychain of the device 1 405 to the new device. On the other hand,device 2 might belong to a malicious user who is trying to gain accessto the confidential information of device 1 in order to use thepasswords and other confidential information of device 1. There istherefore a need to prevent access to the confidential information ofdevice 1 without authorization of the user of device 1.

In order to authenticate device 2, the network 415 forwards (as shown byencircled 4) the request along with the escrow object (as shown by theencircled 5) to the set of secure servers 490. As described in thefollowing sub-sections, the set of secure servers (the secure escrowservice) utilizes several security measures to ensure the safe recoveryof the confidential information of a device by another device. Theescrow object is decrypted and the recovery key is sent (as shown byencircled 6) to device 2 only if several security measures are satisfiedand user device 2 is authenticated. After user device 2 receives therecovery key, the recovery key is used to decrypt the encrypted keybag,which is separately received by user device 2. Details of theseoperations are described in the following sections. Although severalexamples are described in this disclosure where the escrow object iscreated, stored, and decrypted in order to protect the recovery key, oneof ordinary skill in the art would realize that the same techniquesdisclosed herein are applicable for protecting other types of keys andconfidential information.

I. Security Measurements for Backing Up Confidential Information of aDevice Outside the Device

A. Keychain is Safe when User Credentials are Compromised

There is a thriving black market industry where people try to discoverusernames and passwords stored in remote network storages so that theycan then build a database of accounts and passwords and sell them. Onereason that the black market is successful is that the passwords areusually weak and easy to guess. People tend to re-use passwords amongdifferent services so if the password to one service is compromised,there's a good chance that the same password can be used for otherapplications.

Therefore, some embodiments of the invention do not rely solely on theuser credentials (e.g., a username and password) that are used to accessnetwork storage to secure the backed up payload (e.g., the keychain orkeybag). In these embodiments, the payload is encrypted with a strongkey prior to being backed up in the network storage. Even though one canguess and compromise the username and password for retrieving databacked up on network storage, the retrieved payload is encrypted with astrong key.

Encrypting the payload with a key that is not based on usernames andpasswords also makes the keys scalable. For instance, as the technologyfor trying brute force attacks improves, longer keys are required toprotect data. In a scalable system, the keys can be made stronger byincreasing the number of bits in the keys from e.g., 128 bits to 256bits. It is understood that such an upgrade may require re-encryptingthe confidential information and validating them with the users. Detailsof the encryption of the payload prior to being backed up in the networkstorage are described in “Generation and encryption of keychain in auser device” section below.

B. Keychain or Keybag is Safe when the Network Storage is Compromised

In some embodiments, the network applies rate limiting to limit thenumber of passwords that can be tried for a user account. For instance,when wrong password is repeatedly received for a username, the networkdoes not allow retires for a certain period of time in some embodiments.The network in some embodiments, notifies the owner of the account thatseveral unsuccessful tries have been made to access the user account. Inother embodiments, the network increases the amount of timeout aftereach try in order to make it time prohibitive to keep on tryingdifferent passwords.

However, if the network itself is compromised (e.g., by an insider or bya remote intruder), an intruder might get control of the networksoftware and attempt to repeatedly try different passwords in order togain access to users account in the network. As shown in FIG. 4, whenthe network 415 receives the request to restore the payload ofconfidential information of device 1 405 to device 2 410, the networkdoes not (and as described below cannot) decrypt the escrow object toget to the recovery key. Instead, the network forwards the request alongwith the escrow object to a set of highly secure servers 490 which haveone of the keys needed to decrypt the escrow object. As described below,the escrow object is encrypted with a strong public key that isgenerated by these servers 490. The network is, therefore, not capableof decrypting the escrow object as the private key that decrypts theescrow object is not known to the network. The servers 490 act as asecure escrow service and decrypt the escrow object and deliver therecovery key to the requesting device upon successful authentication ofthe device 2.

Some embodiments of the invention provide protection against the networkbeing compromised by performing escrow object decryption as well asauthentication of the requesting user device by a set of separateservers with highly secured hardware security modules (HSMs) 490. TheseHSMs in some embodiments are located in a secured and controlledenvironment. Each HSM is a physical device capable of asymmetriccryptography and providing asymmetric cryptography. In some embodiments,the HSMs perform cryptography by using asymmetric public/private keypairs. The HSMs create a public/private key pair and send the public keyto the user devices to encrypt their recovery keys. The private key isstored locally and is used to decrypt the escrow object received fromthe network storage prior to sending the recovery key to a user devicethat is requesting to recover the backed up confidential information.The HSMs in some embodiments are clustered together in groups or podsfor redundancy and high availability.

As described further below, the recovery key is also encrypted with anescrow key which is generated based on username, password, and answer toone or more secret questions that are asked from the user of device 1405. The HSMs in some embodiments request device 2 410 to create anescrow key based on the username, password, and answer to the samequestions as were used to generate the escrow key. If the escrow keyprovided by device 2 410 can decrypt the encrypted recovery key, theuser of device 2 knows the same username, password, and answer to secretquestions as user of device 1. The HSMs, therefore, trust user device 2and send the recovery key to device 2 to decrypt and restore e.g., thekeybag of device 1 to device 2. Otherwise, the HSMs allow apredetermined number of retires (e.g., 2, 5, 10, etc.). Each time theuser provides correct answers and the resulting escrow key can decryptthe encrypted recovery key, the number of attempted retries is reset tozero. In some embodiments, after the number of failed retire reaches thepredetermined number, the escrow record becomes irrevocably locked. Inother embodiments, the HSMs use a rate limiting with geometric back offprocess to prevent a malicious user to keep on trying to generatedifferent escrow keys. Details of sending the encrypted recovery keyfrom the network to the HSM for decryption and device authentication aredescribed in “Storing confidential information of a first device andretrieving the confidential information for a second device” sectionbelow.

In some embodiments, the HSMs, at the time of forming a pod, producetheir own certificate. For example, a single public/private key pairmight be used as the Secure Escrow Service (SES) Certificate Authority(CA). That private key of some embodiments is setup by the process andoperations of FIGS. 12 and 13 described below. The private key is boundto a particular version of the HSM executable code, and the public keyis sent to an outside trusted entity (e.g., a root/anchor CA). Here,each time an individual pod forms, the N members of the pod worktogether to generate a public/private key pair known only to thespecific pod. Thereafter, the pod certifies the public pod key using theSES CA key. Thus, at the time the pod is formed, there is no need tosend each and every pod public key to an external trusted entity for anyform of certification. Only the certification of the initial CA key (andtherefore the specific HSM executable code) needs to be done.

C. Keychain is Safe when Secure Escrow Servers are Compromised

In some embodiments, each group or pod of several HSMs is assigned toprocess requests for a particular group of devices where a request fromthe same device is always processed by the same pod of HSMs. Someembodiments ensure that even when the HSMs are compromised, the keybagis safe. For instance, a malicious user might take over the HSMs andattempt to bypass the rate limiting process. Alternatively, when a podof HSMs is running in a foreign country, a governmental entity mightcome with a subpoena and request the HSM software to be modified tobypass (or turn off) the maximum number of retires or the rate limitingand geometric back off features.

In order to prevent HSM executable code to be compromised, someembodiments generate the public and private key used by HSMs and tie theprivate key to the hash of the particular version of the executable codethat runs on the HSMs when the keys are generated. As described furtherbelow, when the HSMs attempt to decrypt the escrow object, the privatekey used for decryption is only accessible if the hash of the executablecode that runs on the HSMs when the recovery key is being decrypted isthe same as the hash of the HSM executable code when the public/privatekey pair was generated.

Accordingly, even when the software that runs on the HSMs is modified tobypass the rate limiting feature (or the software is modified for anyother reasons) the hash value of the modified code would not match thehash of the code when the keys were generated. The private key would notbe accessible and the escrow object cannot be decrypted to get to therecovery key. Details of securing the HSM executable code are describedin “Ensuring the secure escrow servers are not compromised” sectionbelow.

In several of the example described above, each HSM is a physical devicecapable of asymmetric cryptography and providing asymmetriccryptography. However, the HSM of some embodiments does not exclusivelyuse asymmetric cryptography. As an example, this section C describestying the hash of the executable code to permission to use the privateasymmetric key. Instead of such operation, for performance reasons, theHSM may take the original escrow blob on initial receipt, decrypt itwith the HSM private key, and re-encrypt to a symmetric key shared amongthe HSMs in the pod. In some embodiments, that symmetric key would betied to the hash of the executable code as well.

D. Keychain is Safe when HSM Pods are Duplicated

Since modifying HSM executable code makes the private key that is neededto decrypt the escrow object inaccessible, an entity such as a foreigngovernment with subpoena power and large amount resources might attemptto buy a large number of HSMs and try by brute force to use differentprivate keys to decrypt the escrow object. This is obviouslycost-prohibitive. However, some embodiments utilize a novel method toprevent such duplication of resources in order to have access to adevice's confidential information.

As described above, in some embodiments HSMs operate in groups or pods,which provide the ability to provide redundancy and allow for one HSM tobe taken offline for repairs while other HSMs in the pod continue toprocess requests from devices that are assigned to them. In theseembodiments, the HSMs in a pod of n HSMs recognize each other usingcryptography and agree that they never allow more than n simultaneousactive members in the pod. For instance, the HSMs in a pod generate akey that they share among themselves. This key is also tied to the hashof the executable code of the HSMs. Therefore, if the code is changed toincrease the number of HSMs in the pod, the hash of the executable codechanges and the key that is shared among the HSMs becomes inaccessible.Details of ensuring that the keybag is safe when HSM pods are duplicatedare described in “Ensuring the secure escrow servers are notcompromised” section below.

Several more detailed embodiments of the invention are described insections below. Section II describes generation and encryption ofkeychains in a user device in some embodiments. Next, Section IIIdescribes storing confidential information of a device outside thedevice in some embodiments. Section IV then describes how theconfidential information of a first device is retrieved for a seconddevice in some embodiments. Section V describes how some embodimentsensure that a set of secured servers are not compromised. Finally, adescription of an electronic system with which some embodiments of theinvention are implemented is provided in Section VI.

II. Generation and Encryption of Keychain in a User Device

FIG. 5 conceptually illustrates a process 500 for generating a keychainin some embodiments of the invention. As shown, process 500 receives (at505) a user confidential information item for storing in a keychain. Theuser confidential information include passwords (e.g., for websites,e-mail accounts, FTP servers, wireless networks, encrypted disk images,private keys, certificates, secure notes, etc.), account numbers, creditcard numbers, personal identification numbers for bank accounts, privatekeys, etc.

Process 500 then receives (at 510) an identification of a keychain. Theprocess determines (at 515) whether the identified keychain exits. Ifyes, the process proceeds to 525 which is described below. Otherwise,the process creates (at 520) the keychain. The process then encrypts (at525) the received confidential information item. Some embodimentsrandomly generate an item key for the confidential item and encrypt theconfidential item with the item key. In some embodiments, eachconfidential information item corresponds to a class in a set ofclasses. For instance, in some embodiments confidential information thatare available only when a device is unlocked and confidentialinformation that are available even when the device is locked belong todifferent classes. In these embodiments, each confidential informationitem (or the confidential information item that is encrypted with anitem key) is encrypted with the corresponding class key. Process 500then stores (at 530) the encrypted confidential information in thekeychain. The process then exits. In some embodiments a set ofattributes corresponding to the confidential item is also stored in thekeychain. For instance, the attributes for an Internet password caninclude security domain, protocol type, and path. In some embodiments,each item stored in the keychain has an associated access control list(ACL) that indicates operations that can be done on the item (e.g.,decrypting or authenticating) as well as a list of trusted applicationsthat are allowed to perform those operations on the item withoutauthorization from the user.

FIG. 6 conceptually illustrates a process 600 for backing upconfidential information of a device in some embodiments of theinvention. As shown, the process receives (at 605) a request to back upthe confidential information outside the device. The process sends (at610) the encrypted keychain to the network for storage. As describedabove, in some embodiments, some or all items in the keychain areindividually encrypted with strong keys (e.g., with class keys and/oritem keys). The process also encrypts (at 615) the keybag (whichincludes the class keys) with a recovery key. The process then sends (at620) the encrypted keybag to the network for storage.

The process then creates (at 625) an escrow key based on one or moreuser-specific information items known to the user. The user-specificinformation items include one or more items such as username, password,and answer to secret questions that are provided by the user.

The process then encrypts (at 630) the recovery key with the escrow keyto create a recovery object, also referred to herein as the recoverybinary large object (blob). The process then receives (at 635) thepublic key of the secure escrow service. The process then encrypts (at640) the recovery object with the public key to create the escrow object(or escrow blob). The process then sends (at 645) the escrow object tothe network for storage. The process then exits.

FIG. 7 conceptually illustrates a system for creating and backing upconfidential information of a user device in some embodiments of theinformation. In some embodiments, the system in FIG. 7 utilizes process500 (which was described by reference to FIG. 5 above) to createkeychains and process 600 (which was described by reference to FIG. 6above) to encrypt the confidential information and send the encryptedinformation for backup outside the user device. The figure only showsthe modules that are used to create and backup the keychain and itsassociated keys (e.g., class keys stored in the keybag and the recoverykey that is used to encrypt the keybag). One of ordinary skill in theart would recognize that the modules shown in FIG. 7 are specific tocreating and backing up confidential information of a user device ofsome embodiments and that the user device of some embodiments includesnumerous additional modules, which are not shown in this figure.

As shown, the user device 700 includes the following modules: keychaingenerator 760, recovery key generator 765, keybag encryptor 775,recovery object generator 780, escrow key generator 788, escrow objectgenerator 785, keychain backup 796, and local storage 799. The recoverykey generator module 765 generates the recovery key 720 and stores (asshown by encircled 1) the key in local storage 799. In some embodiments,the recovery key generator module creates and stores the recovery key inthe user device local storage 799 during the system setup of device 700.In some embodiments, the recovery key stored in the user device storageis further encrypted to protect the recovery key from unauthorizedaccess.

As shown in FIG. 7, the keychain generator module 760 receives (as shownby encircled 2) the confidential information items 794 from the user 797of the device 700. The keychain generator module 760 receives (as shownby encircled 3) keychain encryption keys (e.g., item keys and/or classkeys) and encrypts the confidential information items 794, stores themin the corresponding keychains 705, and saves the encrypted keychain (asshown by encircled 4) in local storage 799. In some embodiments, thekeychain encryption keys stored in the user device storage are furtherencrypted to protect the keys from unauthorized access.

Keychain backup module 796 receives (as shown by encircled 5) theencrypted keychain 710. The encrypted keychain 705 is sent (as shown byencircled 6) to the network 750 and is saved in the network storage 755.The keybag encryptor module 775 uses (as shown by encircled 7) therecovery key 715 and encrypts the keybag 715. The encrypted keybag 725is sent (as shown by encircled 8) to network 750 for storage in networkstorage 755. FIG. 8 conceptually illustrates the keybag 715 which isencrypted by the recovery key 720 to create the encrypted keybag 725 insome embodiments of the invention.

Escrow key generator 788 generates the escrow key 730 based on a set ofuser-dependent information items 795 (as shown by encircled 9) such asusername, password, and answer to one or more secret questions (e.g.,mother's maiden name, the name of an elementary school friend, name ofthe first pet, etc.). Escrow key generator 788 then creates the escrowkey based on one of more of these user-dependent information items. Theescrow key is either passed (as shown by encircled 10) to the recoveryobject generator module 780 or is stored in the local storage for use bythe recovery object generator module. Recovery object generator 780receives the escrow key 730 from escrow key generator module 788 (orfrom local storage) and encrypts the recovery key (as shown by encircled11) to generate the recovery object (or recovery blob) 735. The recoveryobject is sent (as shown by encircled 12) to escrow blob generatormodule 785.

Escrow blob generator module 785 receives (as shown by encircled 14) thepublic key 740 of the secure escrow service 790. The public key isreceived (as shown by encircled 13) by a trusted entity 792 from thesecure escrow service 790 and is distributed to user devices. Escrowblob generator module 785 encrypts the recovery object by using thepublic key 740 to create the escrow object (or escrow blob) 745. Theescrow blob 745 is sent (as shown by encircled 15) to the network 750and is saved in the network storage 755. FIG. 9 conceptually illustratesthe recovery key 720 which is encrypted by the escrow key 730 to createthe recovery object 735 which is in turn encrypted by the public key 740of the HSMs to create the escrow object 745 in some embodiments of theinvention.

III. Storing Confidential Information of a Device in Network Storage

FIG. 10 conceptually illustrates a system for receiving the escrowobject from a user device, storing the escrow object, and retrieving therecovery key encrypted by the escrow object to another user device insome embodiments of the invention. As shown, user device 1 700 sends (asshown by encircled 1-3) the encrypted keychain 705, the encrypted keybag725, and the escrow object 745 to network 750 for storing in the networkstorage 755. As described by reference to FIG. 7, the keybag isencrypted with the recovery key 720 and the escrow object encrypts therecovery key.

At a subsequent time, user device 2 1005 sends (as shown by encircled 4)a request for the confidential information (e.g., keychain and/orkeybag) of user device 1 700. In some embodiments, user device 2 1005also generates and sends (as shown by encircled 5) a session key 1015 inorder to encrypt communications for retrieving the recovery blob.

The network 750 sends (as shown by encircled 6-8) the request for theconfidential information, the escrow object 745, and the session key1015 to secure escrow service 790 which ensures the authenticity of userdevice 2 1005. The secure escrow service first ensures that the coderunning in the set of servers has not changed since the public key 740(shown in FIG. 7) and a matching private key were generated. If the codehas changed, the secure escrow service servers are prevented from usingthe private key to decrypt the escrow object 745. The details ofensuring that the code has not changed are described further below. Insome embodiments, the session key is sent securely to the HSMs. Forexample, the session key may be encrypted to the public key of the HSM.

If the code running on the secure escrow service servers has notchanged, secure escrow service 790 decrypts the escrow object by usingthe private key to get the recovery object 735. Secure escrow service790 then sends (as shown by encircled 9) a request to user device 2 1005for the escrow key. User device 2 1005 sends (as shown by encircled 10)a request to the user 1030 of user device 2 to provide username,password, and answer to secure questions that are required to generatethe escrow key. The user device then generates an escrow key 1020 basedon the username, password, and answers provided by the user 1030 (asshown by encircled 11). User device 2 sends (as shown by encircled 12)the generated escrow key 1020 to secure escrow service.

If the escrow key received by the secure escrow service 790 cannotdecrypt the recovery blob, the secure escrow service in some embodimentsallows a predetermined number of retires. If the user succeeds inproviding the right answers and a valid escrow key is generated, thenumber of attempted retires is reset to zero. Otherwise, when the numberof successive failed retries reaches the predetermined number, theescrow record is irrevocably locked to the user device 2 in someembodiments. In other embodiments, the secure escrow sets ageometrically increasing timeout. After the expiration of the timeout,the secure escrow service sends another request for the escrow key touser device 2. In some embodiments, the user would initiate sending therequest for the escrow key, and the attempt to retry would only progressif enough time had elapsed since the last try.

If the escrow key was able to decrypt the recovery blob (i.e., user 1030had successfully provided username, password, and answer to secretquestions), the secure escrow service decrypts the recovery object toget the recovery key 720. The secure escrow service then encrypts therecovery key with the session key 720 and sends (as shown by encircled13) it to user device 2 1005. After being successfully authenticated,user device 2 separately receives (not shown) the keybag and keychain ofuser device 1 and uses the recovery key to decrypt the keybag. The classkeys in the keybag are used in turn to recover the keychain of userdevice 1 700 to user device 2 1005.

In an alternative embodiment, the network 750 receives the set ofpasswords and other user dependent information 795 that was used by userdevice 1 to create the escrow key 730 (shown in FIG. 7) from userdevice 1. In these embodiments, the network sends this information tothe secure escrow service and the secure escrow service requests andreceives the same information (i.e., the passwords and other userdependent information) from user device 2. If the information receivedfrom user device 2 matches the information received from the network,the secure escrow service concludes that user device 2 is legitimate andsends the recovery object (the recovery key encrypted by the escrow key)to user device 2. User device 2 creates the escrow key, as describedabove, and decrypts the recovery object to get the recovery key.

FIG. 11 conceptually illustrates a process 1100 that a network uses tostore the confidential information of a user device in some embodimentsof the invention. As shown, the process receives (at 1105) the encryptedkeychain and stores (at 1110) the encrypted keychain in the networkstorage.

The process then receives (at 1115) the encrypted keybag and stores (at1120) the encrypted keybag in the network storage 755. The process thenreceives (at 1120) the escrow object and stores (at 1125) the escrowobject in the network storage 755. The process then exits.

IV. Storing Confidential Information of a First Device and Retrievingthe Confidential Information for a Second Device

A. Generation of Public and Private Key Pair by Secure Escrow Service

FIG. 12 conceptually illustrates a process 1200 for creating a publicand private key pair by the secure escrow service in some embodiments ofthe invention. As shown, the process creates (at 1205) a public andprivate key pair. Secure escrow service in some embodiments providesstrong encryption by generating public and private keys that are 256bits or more. Some embodiments utilize an asymmetric key pair (e.g., anelliptic curve asymmetric 256 bits or more key pair). In someembodiments, the public and private key lengths are scalable to provideadequate security as more computing power becomes available tocompromise encrypted data by brute force attaches. This ensures thateven if a user's username and password for accessing the network storageis compromised and the escrow object is retrieved, the escrow object isencrypted by the strong public key and an intruder will not be able toreadily decrypt the escrow object. The public key is known by the publicwhile the private key is kept secret at the secure escrow service.

The process then sends (at 1210) the public key to a trusted entity fordistribution to user devices. The process also calculates (at 1215) thehash of the executable code that is currently running on the HSMs. Theprocess then includes the calculated hash in an access control list(ACL) and associates the ACL with the private key. Including thecalculated hash in the ACL guarantees that in future only the HSMs withthe same executable hash can access the private key to decrypt theescrow blobs. The process then stores (at 1225) the private key and theassociated ACL in the local storage of the secure escrow service. Theprocess then exits.

Some embodiments perform variations on the process 1200. The specificoperations may not be performed in one continuous series of operations,and different specific operations may be performed in differentembodiments. For instance, the process of some embodiments sends thepublic key to a trusted entity for distribution to user devices afterstoring the private key and the associated ACL in the local storage ofthe secure escrow service.

B. Ensuring that HSM Executable Code has not Changed Since Generation ofthe Private Key

FIG. 13 conceptually illustrates different modules of the secure escrowservice 790 for generating the public and private key pair in someembodiments of the invention. As shown, secure escrow service 790includes a public and private key generator system 1305 that includesseveral modules 1310-1320 for generating the public and private keypair. Secure escrow service also includes storage 1320 for storing theprivate key.

As shown, asymmetric key generator module 1310 creates private key 1330and the corresponding public key 740. Asymmetric key generator module1310 sends (as shown by encircled 1) the public key 740 to a trustedentity 792 for distribution (as shown by encircled 2) to user devicessuch as user device 1 700.

Hash generator module 1320 accesses (as shown by encircled 3) theexecutable code 1350 of the HSMs and generates hash 1327 of HSM'sexecutable code. Access control list (ACL) generator module 1315receives the private key 1330 (as shown by encircled 4) and the hash1325 (as shown by encircled 5) and includes the hash of the HSM'sexecutable code in an ACL and associates the ACL with the private key.Access control list (ACL) generator module 1315 stores (as shown byencircled 6) the private key and the corresponding ACL 1340 in thesecure escrow service storage 1325.

Some embodiments perform variations on the process 1200. The specificoperations may not be performed in one continuous series of operations,and different specific operations may be performed in differentembodiments. For instance, the process of some embodiments sends thepublic key to the trust entity after the ACLs are all setup.

FIG. 14 conceptually illustrates a process 1400 for a network thatstores escrow blob to receive a request from a user device forretrieving the backed up confidential information of another userdevice. As shown, the process receives (at 1400) a request from a userdevice to retrieve the backed up confidential information (e.g.,keychain and/or keybag) of another user device. The request includes anidentification of the requesting device and the identification of thedevice whose confidential information is requested. The processoptionally receives (at 1410) a session key to encrypt communicationregarding the confidential information.

The process then sends (at 1415) the escrow object, the request for theconfidential information, and the session key to the secure escrowservice to process the request. The process then ends.

FIG. 15 conceptually illustrates a process 1500 for providing therecovery key of a user device to a different user device. As shown, theprocess receives (at 1505) the escrow object, the request for the backedup confidential information, and the optional session key from thenetwork (e.g., when user device 2 1005 in FIG. 10 sends the request forthe confidential information of user device 1 700 to the network 750 andthe network forwards the request to secure escrow service 790 along withthe escrow object).

The process then calculates (1510) the hash of the executable code thatis currently running on the HSMs. The process then determines (at 1515)whether the access control list attached to HSM private key allowsaccess to the private key by an executable code with the calculatedhash. If not, the process exits without allowing the access to theprivate key. In some embodiments the executable code of the HSM issigned with a code signing key. The code is cryptographically hashed andsigned by the code signing key. When the private key is generated, theACL that is attached to the private key is a pointer to the code signingkey. The private key can only be used if the code that is currentlyexecuting on the HSM was signed by the same code signing key. The secureescrow service is therefore prevented from decrypting the escrow blob ifthe executable code of the HSMs has changed since the private key andthe associated ACL were generated.

When the private key can be accessed, the process uses (at 1520) theprivate key to decrypt the escrow object (or the escrow blob) to get tothe recovery object (or the recovery blob) which includes the recoverykey encrypted by the escrow key.

The process then sends a request to the user device that is requestingthe confidential information to generate and provide the escrow key. Insome embodiments, all communications between process 1500 (which isperformed by the secure escrow service) and the user device that isrequesting the keychain are encrypted by the session key that isreceived from the user device through the network. The process thenreceives (at 1525) the escrow key.

The process then determines (at 1535) whether the received escrow keycan decrypt the recovery object. The received escrow key can onlydecrypt the recovery object if the username, password, and answer tosecret questions provided by the user 1030 of user device 2 1005 (shownin FIG. 10) matches the username, password, and answer to secretquestions provided by the user 797 of user device 1 700 (shown in FIG.7) resulting in the same key as the escrow key 730 that was used toencrypt the recovery object.

If the received escrow key can decrypt (at 1540) the recovery securedobject, the process decrypts the recovery object with the escrow key toget the recovery key. The process then encrypts the recovery key withthe session key and sends (at 1545) the recovery key to the requestingdevice. The requesting device can use (as described by reference to FIG.10) the recovery key to decrypt the encrypted keybag. The process thenexits.

If the received escrow key cannot decrypt the recovery secured object,the process starts (at 1550) a back-off timer that geometricallyincreases with each wrong escrow key. The back-off timer ensures thatafter a few wrong attempts, the time out becomes so long that it becomesinfeasible for a malicious user device to attempt to get the correctescrow key to the secure escrow service by brute force trial. Theprocess then determines (at 1555) whether the time out is expired. Ifnot, the process returns to 1555 and waits for the time out to expire.Otherwise, the process informs (at 1560) the requesting user device thatthe received escrow key is invalid and requests another escrow key. Theprocess then proceeds to 1530 which was described above.

Some embodiments perform variations on the process 1500. The specificoperations may not be performed in one continuous series of operations,and different specific operations may be performed in differentembodiments. For instance, in some embodiments, the user initiatessending the request for the escrow key, and the attempt to retry wouldonly progress if enough time had elapsed since the last try. This mightcause the timer expiration check operation to occur just prior tooperation 1525. That is, if retry timer has elapsed, then the process1500 proceeds to operation 1525; otherwise, the process ends.

As described by reference to FIG. 10 above, in an alternative embodimentthe network receives the set of passwords and other user dependentinformation that was used by user device 1 to create the escrow key 730(shown in FIG. 7) from user device 1. In these embodiments, process 1500receives this information from the network and requests and receives thesame information (i.e., the passwords and other user dependentinformation) from user device 2. If the information received from userdevice 2 matches the information received from the network, process 1500concludes that user device 2 is legitimate and sends the recovery object(the recovery key encrypted by the escrow key) to the requesting userdevice. User device 2 creates the escrow key and decrypts the recoveryobject to get the recovery key.

Yet in other alternative embodiments, instead of utilizing ageometrically increasing timeout (at 1550 and 1555), process 1500utilizes a retry count. In these embodiments, before a first attempt bythe user of the device that is requesting the confidential informationto answer the questions, the retry count is set to zero. Each time theuser provides wrong answers resulting in an escrow key that cannotdecrypt the recovery secured object (at 1535), the retry count isincremented by one. Each time the user provides correct answers and theresulting escrow key can decrypt the recovery secured object, the retrycount is reset to zero. If the retry count reaches a predeterminednumber (e.g., 3, 5, 10, 20, etc.), the recovery secured object becomesirrevocably locked. Any further attempt by the requesting user device toretrieve the recovery key is denied.

FIG. 16 conceptually illustrates a process 1630 for requesting andreceiving the backed up keychain and keybag of a user device by adifferent user device. In some embodiments, this process is performed byuser device 2 shown in FIG. 10. As shown, the process requests (at 1605)the network to provide the keychain (or the encrypted keybag and therecovery key) of a first user device that was backed up in the networkstorage to a second user device. The process then receives (at 1610) arequest from the secure escrow service to provide the escrow key (e.g.,after the secure escrow service 790 receives the request through thenetwork 750 in FIG. 10).

The process then requests (at 1615) the user of the requesting device(i.e., the second device) to provide the username, password, and answerto secret questions that are required to generate the escrow key. Theprocess then receives (at 1620) the information required to generate theescrow key from the user of the requesting device. The process thengenerates (at 1625) the escrow key based on the received information.The process sends (at 1630) the generated escrow key to the secureescrow service.

The process then receives (at 1635) from the secure escrow service. Theprocess then determines (at 1640) whether the secure escrow serviceindicates that the escrow key was invalid. If so, the process proceedsto 1615 to request the user to re-enter the information required togenerate the escrow key. Otherwise, the process uses (at 1645) theescrow key to decrypt the recovery object included in the secure escrowservice response to get the recovery key.

The process then receives (at 1650) the encrypted keybag and keychain ofthe first user device. The process then uses (at 1655) the recovery keyto decrypt the encrypted keybag to get the class keys. The process thenstores (at 1660) the keybag and the class keys in local storage of therequesting user device. The keybag and the class keys are used to accessthe confidential information in the keychain when an information item inthe keychain is required by the user device. The process then exits.

FIG. 17 conceptually illustrates the recovery key delivery system of thesecure escrow service in some embodiments of the invention. As shown,the secure escrow service 790 includes recovery key delivery system 1760and storage 1325. Recovery key delivery system 1760 includes Keydelivery controller module 1780, geometric time out generator module1740, recovery key encryptor module 1735, recovery object decryptormodule 1725, escrow object decryptor module 1720, access control module1715, and hash generator module 1320 (the same or similar module as thehash generator module used by public and private key generator 1305system in FIG. 13).

Key delivery controller module 1780 receives (as shown by encircled 1)the request 1010 for confidential information, escrow object 745, andthe optional session key 1015 from the network 750 (as shown in FIG.10). Key delivery controller module 1780 sends (as shown by encircled 2)the escrow object 745 to escrow object decryptor module 1720 fordecryption. Escrow object decryptor module 1720 requires access to theprivate key 1330 stored in the secure escrow service storage 1325. Inorder for the private key to be accessible, hash generator module 1320calculates the hash 1710 of the executable code (as shown by encircled3) that is currently running on the HSMs.

The hash is passed (as shown by encircled 4) to access control module1715 which determines whether ACL associated with the private key allowsaccess to the private key by the code currently running on the HSMs. Theaccess to the private key is only possible when the hash of theexecutable code 1705 currently running on HSMs matches the hash 1325calculated on the HSMs executable code 1350 (as shown in FIG. 13) whenthe private key was generated. If the private key is accessible (i.e.when the HSM code was not changed and the two hash values match), accesscontrol module 1715 accesses the private key (as shown by encircled 5)and sends (as shown by encircled 6) the private key 1330 to the escrowobject decryptor module 1720. If the private key is not accessible,access control module 1715 sends (as shown by encircled 7) a failureindicator to key delivery controller module 1780.

Escrow object decryptor module 1720 decrypts the escrow object 745 usingthe private key 1330 to get the recovery object 735. The recovery objectis passed (as shown by encircled 8) to recovery object decryptor module1725. Recovery object decryptor module 1725 sends (as shown by encircled9) a request to the requesting user device (user device 2 1005) toprovide the escrow key. The recovery object decryptor module 1725receives (as shown by encircled 10) the escrow key 1025 from user device2 1005. If the received escrow key can decrypt the recovery object(which happens only when the received escrow key 1025 is the same as theescrow key 730 generated by user device 1 700 shown in FIG. 7), recoveryobject decryptor module 1725 sends the recovery key 720 to recovery keyencryptor module 1735. Recovery key encryptor module 1735 uses thesession key 1015 received (as shown by encircled 11) from key deliverycontroller 1780 to encrypt the recovery key with the session key.Recovery key encryptor module 1735 then sends (as shown by encircled 12)the recovery key encrypted with the session key to user device 2 1005.

If the received escrow key cannot decrypt the recovery object, recoveryobject decryptor module 1725 sends (as shown by encircled 13) a starttimeout request 1765 to geometric time out generator module 1740 tostart a timeout that geometrically increases after the receipt of eachinvalid escrow key. When recovery object decryptor module 1725 receives(as shown by encircled 14) an end of timeout indicator 1770 fromgeometric time out generator module 1740, recovery object decryptormodule 1725 sends another request (as shown by encircled 8) for theescrow key to the user device 2. After several tries, if the receivedescrow key is still invalid, the timeout becomes so large that itbecomes impractical for an intruder to try to send every possible escrowkey to secure escrow service 790.

In some alternative embodiments, recovery key delivery system of FIG. 17utilizes a retry count instead of a geometrically increasing timeout.These embodiments include a retry controller module instead of thegeometric time out generator module 1740. If the received escrow keycannot decrypt the recovery object, recovery object decryptor module1725 sends a retry failure indication to retry controller module. On theother hand, if the received escrow key can decrypt the recovery object,recovery object decryptor module 1725 sends a retry count reset requestto retry controller module. The retry controller module initially setsthe retry count to 0 (before any attempts by user device 2 to retrievethe confidential information). The retry controller module incrementsthe retry count upon receiving each failure indication and resets theretry count to 0 upon the receipt of the retry count reset request. Whenthe retry count reaches a predetermined number, the retry controllermodule irrevocably locks the confidential information resulting to anyfurther attempts by user device 2 to retrieve the information to fail.

FIG. 18 conceptually illustrates a keychain/keybag recovery system 1840of a user device 1030 in some embodiments of the invention. This userdevice is requesting to get the backed up keychain and/or keybag ofanother user device. As shown, the user device 1005 includes keychainrecovery system 1840, escrow key generator module 1815, and storage1835. Keychain recovery system 1840 includes session key generatormodule 1805, recovery initiator module 1810, recovery key decryptormodule 1815, encrypted keybag decryptor module 1820, and keychaindecryptor module 1825.

Recovery initiator module 1810 initiates the request to network 750(e.g., after receiving a request from the user 1030 or an automaticrequest from an application that is attempting to restore the keychainof another user device to user device 1005). The user might have ownedanother user device which is lost, stolen, or is being replaced andwants to restore the backed up copy of the user's previous devicekeychain into the user's new device. Alternatively, user 1030 might bean intruder that is attempting to get access to the keychain of anotheruser's device in order to gain access to the other user's confidentialinformation.

Recovery initiator module 1810 optionally receives (as shown byencircled 1) a session key 1015 from session key generator module 1805in order to encrypt communications with the network 750 and secureescrow service 790. Recovery initiator module 1810 sends (as shown byencircled 2) a request for the backed up confidential information (i.e.,the keychain and/or keybag) along with the session key 1015 to thenetwork 750. As described by reference to FIGS. 10 and 17, network 750forwards the request, the escrow object stored in network storage 755,and the session key 1015 to secure escrow service 790 (interactionsbetween the network and the secure escrow service are not shown in FIG.18).

Escrow key generator module 1830 receives (as shown by encircled 3) arequest 1020 for escrow key from the secure escrow service. As describedabove, secure escrow service requires the escrow key in order to decryptthe recovery object to determine whether user device 2 1005 isauthorized to access the keychain of another user device. Also, asdescribed above, secure escrow service can only access the private keyand decrypt the escrow object to get the recovery object if theexecutable code of HSMs has not changed since the private key 1330(shown in FIGS. 13 and 17) was generated.

Escrow key generator module 1830 requests (as shown by encircled 4) theuser 1030 of user device 2 1005 to provide confidential information suchas username, password, and answer to secret questions. Escrow keygenerator module 1830 generates an escrow key 1025 based on the receivedinformation from the user 1030 (as shown by encircled 5) and sends (asshown by encircled 6) the generated escrow key 1025 to secure escrowservice 790. As described by reference to FIGS. 17 and 7 above, if thisinformation is the same as the information entered by user 797 of userdevice 1 700 when the escrow key 730 was generated, secure escrowservice can decrypt the recovery object 735. Matching of the two escrowkeys authenticates user device 2 since the user 1030 of user device 21030 has access to the same secret information as the user 797 of userdevice 1 700.

When the escrow key 1025 received from escrow key generator 1830 isinvalid, after a geometrically increasing timeout, secure escrow servicesends another request (as shown by encircled 3) for the escrow key toescrow key generator module 1830. Otherwise, when the escrow key 1025received from escrow key generator 1830 is valid, secure escrow service790 sends (as shown by encircled 7) the recovery key encrypted by thesession key to recovery key decryptor module 1815. As described above,in some alternative embodiments, the secure escrow service 790 allows apredetermined number of retries instead of using a geometricallyincreasing time. In these embodiments, when the received escrow key isinvalid, the secure escrow service sends another request for the escrowkey to escrow key generator module in the number of successive failedretries has not reached a predetermined number. Otherwise, the escrowedinformation (i.e., the recovery key) is irrevocably locked.

Recovery key decryptor module 1815 receives (as shown by encircled 8)session key from session key generator module 1805 and decrypts theencrypted recovery key to get the recovery key 720. Encrypted keybagdecryptor module 1815 receives the keybag encrypted with the recoverykey (as shown by encircled 9) and uses the recovery key 720 (as shown byencircled 10) to decrypt the encrypted keybag to get the keybag 715 andthe class keys 712.

Encrypted keybag decryptor 1820 stores (as shown by encircled 11) thekeybag 715 in the user device local storage 1835. Upon successfulauthentication of user device 2, the encrypted keychain 705 is alsoreceived from the network and stored in user device local storage 1835.Whenever an item in the keychain is needed by an application 1880(application 1880 can be either internal to the user device or anexternal application), keychain decryptor module 1825 receives theencrypted keychain 705 (as shown by encircled 12) and uses the classkeys in the keybag to access the chain items. The relevant keychain itemis then sent (as shown by encircled 13) to the requesting application1880.

V. Ensuring the Secure Escrow Servers are not Compromised

As described above, each time a user device that is requesting access tothe confidential information of another device fails to provide a validescrow key, the secure escrow service starts a geometrically increasingtimeout to make it increasingly time consuming to try different valuesfor escrow key (e.g., when an intruder uses brute force trying of allpossible different values for the escrow key. In alternativeembodiments, the secure escrow service only allows a predeterminednumber of retries. However, there is still the possibility ofduplicating HSM servers and trying different values of the escrow keywith each group of HSMs. This option, although very expensive, allows anentity (such as a foreign government where a group of HSMs areoperating) to provide (or obligate the operator of HSMs to provide) manycopies of the HSMs in order to try to find the correct escrow key bybrute force. Each group of HSMs is retired after their geometric timeoutbecome prohibitively long (or the number of successive failed retriesreaches the predetermined number) and another group is used to continuetrying different escrow key values.

Some embodiments provide a method for preventing the HSMs to beduplicated. In these embodiments each group (or a pod) of HSMs worktogether. Each pod is assigned to service a particular set of userdevices. In these embodiments, requests from a particular user deviceare always sent to a particular pod of HSMs and all other HSM podsreject any request from that user device.

In some embodiments, the HSMs in a pod all execute the same executablecode. The HSMs in a pod generate a common key that they all recognizeand tie that key to the hash of the executable code of the HSMs when thekey is generated. The HSMs in the pod also agree to a maximum number ofHSMs that can be simultaneously active in the pod. If the number of HSMsin the pod exceeds the agreed upon number, the HSMs will not processdevice requests anymore. For instance, after a predetermine amount oftime, each HSM in the pod contacts the other HSMs in the pod todetermine whether the number of HSMs in the pod has exceeded themaximum. In some embodiments, if an HSM is unable to contact the otherHSMs in the pod for a predetermined amount of time, the HSM marks itselfas offline and stops processing requests from the devices in order toprevent many individual HSMs to be used to do a brute force attack. Inthese embodiments, the working HSMs in the pod has to exceed one inorder to process requests from the devices.

In order to allow regular maintenance of HSMs in a pod, each pod allowsa fewer number of HSMs in the pod as well as replacing an HSM withanother HSM as long as the total number of active HSMs do not exceed thepredetermined (or agreed upon) number and all HSMs execute the same codewith the hash value that is tied to the common key.

In the example described above, one mechanism to limit the number ofHSMs in the pod is to periodically check if there are too many members.In some embodiments, an HSM has to explicitly request to join a pod, andthe HSM will only be admitted if the current operational count is belowthe max. At that point, the newly joining HSM receives a copy of the keyneeded to work on the collection of escrow objects belonging to the pod.New HSMs can join when there are vacancies. Vacancies are formed when aprevious HSM falls out of communication with a majority of members ofthe pod after some timeout. In addition, any minority grouping of podsautomatically stops processing requests and exits the pod if they cannotestablish communication with a majority of pod members after a similartimeout. Some embodiments provide a hysteresis between the two timeoutvalues to deal with race conditions. The timeout for an HSM toautonomously stop servicing requests is lower than the timeout for themajority of members to declare a vacancy, in some embodiments.

FIG. 19 conceptually illustrates examples of valid and invalidconfigurations for a pod HSMs with maximum of three allowed HSMs in someembodiments of the invention. As shown, valid configurations include anyconfiguration of two or three HSMs. The valid combinations include allthree HSMs 1950-1960 (configuration 1905) and any combination of two ofthe three HSMs 1950-1960 in the pod (configurations 1910-1920). Inaddition, any combination (such as configurations 1925-1935) where one,two, or all three HSMs 1950-1960 are replaced by other HSMs isacceptable as long as the maximum number does not exceed three and thenew HSMs execute the same code as the original HSMs in the pod (i.e. thecode that generates the same hash value that is tied to the common keyof the HSMs).

On the other hand, configuration 1945 is invalid because it includesfive HSMs (1950-1975) which exceeds the maximum number of allowed HSMsin the pod. Also, configuration 1925 that includes only one HSM is notallowed in order to prevent individual HSMs to continue processingdevice requests (if the HSMs are allowed to work alone, then unlimitednumber of HSM can be added to do a brute force attempt to try differentescrow keys to decrypt the recovery object).

FIG. 20 conceptually illustrates a process 2000 for determining whetheran HSM pod can process a request from a device. As shown, the processreceives (at 2005) a message from the network that a device isrequesting a backed up item of another user device.

The process then determines (at 2010) whether all HSMs in the podrecognize each other. For instance, the hash of the code in each HSM isthe same, which allows for the HSMs common key to be accessible. If not,the process exits without acting on the device request. In other words,the HSM do not act on a request if they do recognize all HSMs in thepod. When all HSMs in the pod recognize each other, the processdetermines (at 2015) whether HSMs in the pod exceed maximum allowednumber. If yes, the process exits without acting on the device request.

When the maximum allowed number of HSMs is not exceeded, the processdetermines (at 2020) whether there is only one HSM remains in the pod.If yes, the process exits without acting on the device request.Otherwise, the process determines (at 2025) whether the requestingdevice is assigned to the current pod. If not, the process exits withoutacting on the user device request. Otherwise, the process acts (at 2030)on the request (e.g., by running process 1500). After processing therequest, the process exits.

In the example described above, the process determines whether there isonly one HSM remaining in the pod. In some embodiments, the processdetermines whether there is a minority number of HSMs. For example, anytime an individual HSM finds it can only establish contact with aminority number of members (including itself) it may not process therequest.

Although different techniques such as operating the HSMs in pods that donot exceed a maximum, using a common key between the HSMs that is tiedto the hash of their executable code, assigning each user device to aparticular HSM pod, etc., are described by reference to processing arequest to restore the recovery key, the techniques are not limited tothis particular application. The same techniques are applicable to anyapplication where there is a need to protect a key or any otherconfidential information, a need to prevent duplication of servers or aneed to ensure that a set of servers does not exceed a maximum number.

Furthermore, there are applications where confidential information suchas a key, a binary image, any other information has to be dispersed toone device only. However, it is desirable to store multiple copies ofthe confidential information in different severs to provide redundancy.In these applications, the servers have to be prevented to disperse theinformation to multiple devices. An example is a subscriber identitymodule or subscriber identification module (SIM) card that is used in amobile phone. A SIM card has to be used by only one device in order toprevent using the airtime of a user by another user.

Instead of using a physical SIM card, some embodiments store SIM cardinformation of a mobile device in a network storage and deliver theinformation to the mobile device upon request. In order to provideredundancy, the SIM card information is stored in multiple HSMs. TheHSMs are aware of each other's state. When a request to deliver a SIMcard is received by a particular server in the pod, the receiving serverinforms the other servers in the pod that the request is being processedby that particular server. Other servers acknowledge and ignore anyrequests to deliver the same SIM card information.

VI. Electronic System

Many of the above-described features and applications are implemented assoftware processes that are specified as a set of instructions recordedon a computer readable storage medium (also referred to as computerreadable medium). When these instructions are executed by one or morecomputational or processing unit(s) (e.g., one or more processors, coresof processors, or other processing units), they cause the processingunit(s) to perform the actions indicated in the instructions. Examplesof computer readable media include, but are not limited to, CD-ROMs,flash drives, random access memory (RAM) chips, hard drives, erasableprogrammable read-only memories (EPROMs), electrically erasableprogrammable read-only memories (EEPROMs), etc. The computer readablemedia does not include carrier waves and electronic signals passingwirelessly or over wired connections.

In this specification, the term “software” is meant to include firmwareresiding in read-only memory or applications stored in magnetic storagewhich can be read into memory for processing by a processor. Also, insome embodiments, multiple software inventions can be implemented assub-parts of a larger program while remaining distinct softwareinventions. In some embodiments, multiple software inventions can alsobe implemented as separate programs. Finally, any combination ofseparate programs that together implement a software invention describedhere is within the scope of the invention. In some embodiments, thesoftware programs, when installed to operate on one or more electronicsystems, define one or more specific machine implementations thatexecute and perform the operations of the software programs.

A. Mobile Device

The keychain backup and restoration applications of some embodimentsoperate on mobile devices, such as smart phones (e.g., iPhones®) andtablets (e.g., iPads®). FIG. 21 is an example of an architecture 2100 ofsuch a mobile computing device. Examples of mobile computing devicesinclude smartphones, tablets, laptops, etc. As shown, the mobilecomputing device 2100 includes one or more processing units 2105, amemory interface 2110 and a peripherals interface 2115.

The peripherals interface 2115 is coupled to various sensors andsubsystems, including a camera subsystem 2120, a wireless communicationsubsystem(s) 2125, an audio subsystem 2130, an I/O subsystem 2135, etc.The peripherals interface 2115 enables communication between theprocessing units 2105 and various peripherals. For example, anorientation sensor 2145 (e.g., a gyroscope) and an acceleration sensor2150 (e.g., an accelerometer) are coupled to the peripherals interface2115 to facilitate orientation and acceleration functions.

The camera subsystem 2120 is coupled to one or more optical sensors 2140(e.g., a charged coupled device (CCD) optical sensor, a complementarymetal-oxide-semiconductor (CMOS) optical sensor, etc.). The camerasubsystem 2120 coupled with the optical sensors 2140 facilitates camerafunctions, such as image and/or video data capturing. The wirelesscommunication subsystem 2125 serves to facilitate communicationfunctions. In some embodiments, the wireless communication subsystem2125 includes radio frequency receivers and transmitters, and opticalreceivers and transmitters (not shown in FIG. 21). These receivers andtransmitters of some embodiments are implemented to operate over one ormore communication networks such as a GSM network, a Wi-Fi network, aBluetooth network, etc. The audio subsystem 2130 is coupled to a speakerto output audio (e.g., to output user-specific questions for generatingthe escrow key). Additionally, the audio subsystem 2130 is coupled to amicrophone to facilitate voice-enabled functions, such as voicerecognition (e.g., for searching), digital recording, etc.

The I/O subsystem 2135 involves the transfer between input/outputperipheral devices, such as a display, a touch screen, etc., and thedata bus of the processing units 2105 through the peripherals interface2115. The I/O subsystem 2135 includes a touch-screen controller 2155 andother input controllers 2160 to facilitate the transfer betweeninput/output peripheral devices and the data bus of the processing units2105. As shown, the touch-screen controller 2155 is coupled to a touchscreen 2165. The touch-screen controller 2155 detects contact andmovement on the touch screen 2165 using any of multiple touchsensitivity technologies. The other input controllers 2160 are coupledto other input/control devices, such as one or more buttons. Someembodiments include a near-touch sensitive screen and a correspondingcontroller that can detect near-touch interactions instead of or inaddition to touch interactions.

The memory interface 2110 is coupled to memory 2170. In someembodiments, the memory 2170 includes volatile memory (e.g., high-speedrandom access memory), non-volatile memory (e.g., flash memory), acombination of volatile and non-volatile memory, and/or any other typeof memory. As illustrated in FIG. 21, the memory 2170 stores anoperating system (OS) 2172. The OS 2172 includes instructions forhandling basic system services and for performing hardware dependenttasks.

The memory 2170 also includes communication instructions 2174 tofacilitate communicating with one or more additional devices; graphicaluser interface instructions 2176 to facilitate graphic user interfaceprocessing; image processing instructions 2178 to facilitateimage-related processing and functions; input processing instructions2180 to facilitate input-related (e.g., touch input) processes andfunctions; audio processing instructions 2182 to facilitateaudio-related processes and functions; and camera instructions 2184 tofacilitate camera-related processes and functions. The instructionsdescribed above are merely exemplary and the memory 2170 includesadditional and/or other instructions in some embodiments. For instance,the memory for a smartphone may include phone instructions to facilitatephone-related processes and functions. Additionally, the memory mayinclude instructions for a keychain backup or restoration application aswell as other applications. The above-identified instructions need notbe implemented as separate software programs or modules. Variousfunctions of the mobile computing device can be implemented in hardwareand/or in software, including in one or more signal processing and/orapplication specific integrated circuits.

While the components illustrated in FIG. 21 are shown as separatecomponents, one of ordinary skill in the art will recognize that two ormore components may be integrated into one or more integrated circuits.In addition, two or more components may be coupled together by one ormore communication buses or signal lines. Also, while many of thefunctions have been described as being performed by one component, oneof ordinary skill in the art will realize that the functions describedwith respect to FIG. 21 may be split into two or more integratedcircuits.

B. Computer System

FIG. 22 conceptually illustrates an electronic system 2200 with whichsome embodiments of the invention are implemented. The electronic system2200 may be a computer (e.g., a desktop computer, personal computer,tablet computer, etc.), phone, PDA, or any other sort of electronic orcomputing device. Such an electronic system includes various types ofcomputer readable media and interfaces for various other types ofcomputer readable media. Electronic system 2200 includes a bus 2205,processing unit(s) 2210, a graphics processing unit (GPU) 2215, a systemmemory 2220, a network 2225, a read-only memory 2230, a permanentstorage device 2235, input devices 2240, and output devices 2245.

The bus 2205 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices ofthe electronic system 2200. For instance, the bus 2205 communicativelyconnects the processing unit(s) 2210 with the read-only memory 2230, theGPU 2215, the system memory 2220, and the permanent storage device 2235.

From these various memory units, the processing unit(s) 2210 retrievesinstructions to execute and data to process in order to execute theprocesses of the invention. The processing unit(s) may be a singleprocessor or a multi-core processor in different embodiments. Someinstructions are passed to and executed by the GPU 2215. The GPU 2215can offload various computations or complement the image processingprovided by the processing unit(s) 2210. In some embodiments, suchfunctionality can be provided using CoreImage's kernel shading language.

The read-only-memory (ROM) 2230 stores static data and instructions thatare needed by the processing unit(s) 2210 and other modules of theelectronic system. The permanent storage device 2235, on the other hand,is a read-and-write memory device. This device is a non-volatile memoryunit that stores instructions and data even when the electronic system2200 is off. Some embodiments of the invention use a mass-storage device(such as a magnetic or optical disk and its corresponding disk drive) asthe permanent storage device 2235.

Other embodiments use a removable storage device (such as a floppy disk,flash memory device, etc., and its corresponding disk drive) as thepermanent storage device. Like the permanent storage device 2235, thesystem memory 2220 is a read-and-write memory device. However, unlikestorage device 2235, the system memory 2220 is a volatile read-and-writememory, such a random access memory. The system memory 2220 stores someof the instructions and data that the processor needs at runtime. Insome embodiments, the invention's processes are stored in the systemmemory 2220, the permanent storage device 2235, and/or the read-onlymemory 2230. For example, the various memory units include instructionsfor processing multimedia clips in accordance with some embodiments.From these various memory units, the processing unit(s) 2210 retrievesinstructions to execute and data to process in order to execute theprocesses of some embodiments.

The bus 2205 also connects to the input and output devices 2240 and2245. The input devices 2240 enable the user to communicate informationand select commands to the electronic system. The input devices 2240include alphanumeric keyboards and pointing devices (also called “cursorcontrol devices”), cameras (e.g., webcams), microphones or similardevices for receiving voice commands, etc. The output devices 2245display images generated by the electronic system or otherwise outputdata. The output devices 2245 include printers and display devices, suchas cathode ray tubes (CRT) or liquid crystal displays (LCD), as well asspeakers or similar audio output devices. Some embodiments includedevices such as a touchscreen that function as both input and outputdevices.

Finally, as shown in FIG. 22, bus 2205 also couples electronic system2200 to a network 2225 through a network adapter (not shown). In thismanner, the computer can be a part of a network of computers (such as alocal area network (“LAN”), a wide area network (“WAN”), or an Intranet,or a network of networks, such as the Internet. Any or all components ofelectronic system 2200 may be used in conjunction with the invention.

Some embodiments include electronic components, such as microprocessors,storage and memory that store computer program instructions in amachine-readable or computer-readable medium (alternatively referred toas computer-readable storage media, machine-readable media, ormachine-readable storage media). Some examples of such computer-readablemedia include RAM, ROM, read-only compact discs (CD-ROM), recordablecompact discs (CD-R), rewritable compact discs (CD-RW), read-onlydigital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a varietyof recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.),flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.),magnetic and/or solid state hard drives, read-only and recordableBlu-Ray® discs, ultra density optical discs, any other optical ormagnetic media, and floppy disks. The computer-readable media may storea computer program that is executable by at least one processing unitand includes sets of instructions for performing various operations.Examples of computer programs or computer code include machine code,such as is produced by a compiler, and files including higher-level codethat are executed by a computer, an electronic component, or amicroprocessor using an interpreter.

While the above discussion primarily refers to microprocessor ormulti-core processors that execute software, some embodiments areperformed by one or more integrated circuits, such as applicationspecific integrated circuits (ASICs) or field programmable gate arrays(FPGAs). In some embodiments, such integrated circuits executeinstructions that are stored on the circuit itself. In addition, someembodiments execute software stored in programmable logic devices(PLDs), ROM, or RAM devices.

As used in this specification and any claims of this application, theterms “computer”, “server”, “processor”, and “memory” all refer toelectronic or other technological devices. These terms exclude people orgroups of people. For the purposes of the specification, the termsdisplay or displaying means displaying on an electronic device. As usedin this specification and any claims of this application, the terms“computer readable medium,” “computer readable media,” and “machinereadable medium” are entirely restricted to tangible, physical objectsthat store information in a form that is readable by a computer. Theseterms exclude any wireless signals, wired download signals, and anyother ephemeral signals.

While the invention has been described with reference to numerousspecific details, one of ordinary skill in the art will recognize thatthe invention can be embodied in other specific forms without departingfrom the spirit of the invention. In addition, a number of the figures(including FIGS. 5, 6, 11, 12, 14-16, and 20) conceptually illustrateprocesses. The specific operations of these processes may not beperformed in the exact order shown and described. The specificoperations may not be performed in one continuous series of operations,and different specific operations may be performed in differentembodiments. Furthermore, the process could be implemented using severalsub-processes, or as part of a larger macro process. Thus, one ofordinary skill in the art would understand that the invention is not tobe limited by the foregoing illustrative details, but rather is to bedefined by the appended claims.

What is claimed is:
 1. A method of restoring a set of confidential information items of a first device to a second device using a set of servers, the method comprising: generating a public and private key pair; storing the private key and a corresponding access control on the set of servers, the access control allowing access to the private key only to executable code having a same hash value as a hash value of executable code running on the set of server at a time of generating the public and private key pair; receiving a request to restore the set of confidential information items to the second device, the request comprising a first secure object, the first secure object comprising a second secure object encrypted with said private key, the second object comprising a recovery key encrypted with a first user-specific key, the recovery key encrypting the confidential information requested by the second device, the first user-specific key generated by the first device based on answers to a set of user-specific questions; decrypting the first secure object using the private key to access the second secure object, the private key accessible only when a hash value of the executable code running on the set of servers at a time of accessing the private key matches the first hash of the executable code running on the set of servers at the time of generating the private key; receiving a second user-specific key from the second device, the second user-specific key generated based on a same set of user-specific questions used to generate the first user-specific key by the first device; generating a progressively increasing timeout each time the second user-specific key received from the second device does not match the first user-specific key; repeating said receiving the second user-specific key and said generating the progressively increasing timeout as long as the second user-specific key received from the second device does not match the first user-specific key; decrypting the second secure object with the second user-specific key to get the recovery key when the second user-specific key received from the second device matches the first user-specific key; and sending the recovery key to the second device after the second secure object is decrypted.
 2. The method of claim 1, wherein the set of servers is a first set of servers in a plurality of set of servers, the method further comprising: assigning each device in a plurality of devices to one set of servers in the plurality of set of servers, the plurality of devices comprising the first and second devices; ignoring a request by the second device to restore a set of confidential information items of a device in the plurality of devices when the request is received by a set of servers other than the first set of servers; and processing the request by the second device to restore a set of confidential information items of a device in the plurality of devices when the request is received by the first set of servers.
 3. The method of claim 1 further comprising: generating a common key recognizable by all servers in the set of servers; associating an access control to the common key, the access control allowing access to the common key only to executable code having a same hash value as a hash value of the executable code running on the set of servers at the time of generating the common key; and ignoring a request to restore a set of confidential information items to a device when a hash value of the executable code running on the set of servers at the time of receiving the request does not match the hash value of the executable code running on the set of servers at the time of generating the common key.
 4. The method of claim 1 further comprising: setting a maximum number for the servers in the set of servers; and ignoring a request to restore a set of confidential information items to a device when a number of HSMs in the set of servers exceeds the maximum number.
 5. The method of claim 1, wherein the requested set of confidential information comprises a set of class keys of encrypting a set of passwords.
 6. The method of claim 1, wherein the requested set of confidential information comprises a set of passwords, each password in the set of passwords is associated with a class key, wherein the class keys are encrypted by the recovery key.
 7. The method of claim 1, wherein the recovery key is a device dependent key that is generated by the first device.
 8. The method of claim 1, wherein the first secure object is stored in a network storage, wherein the request to restore the set of confidential information items to the second device is received from the network after the network receives a request from the second device to restore the set of confidential information item of the first device to the second device.
 9. The method of claim 1, wherein (i) encryption of the recovery key by the first user-specific key to create a second secure object and (ii) encryption of the second secure object by the public key of the set of servers to create the first secure object are done by the first device.
 10. The method of claim 9, wherein the first secure object is sent by the first device to a network for storage, wherein the network sends the request to restore the set of confidential information items to the second device and the first secure object to the set of servers after the network receives the request from the second user device.
 11. A method of ensuring integrity of a set of secure servers that provide confidential information items to a plurality of devices, the method comprising: generating a common key recognizable by all servers in the set of servers; associating an access control to the common key, the access control allowing access to the common key only to executable code having a same hash value as a hash value of the executable code running on the set of servers at the time of generating the common key; and ignoring a request to send a set of confidential information items to a device when a hash value of the executable code running on the set of servers at the time of receiving the request does not match the hash value of the executable code running on the set of servers at the time of generating the common key.
 12. The method of claim 11 further comprising: setting a maximum number for the servers in the set of servers; and ignoring a request to restore a set of confidential information items to a device when a number of servers in the set of servers exceeds the maximum number.
 13. The method of claim 12 further comprising ignoring a request to restore a set of confidential information items to a device when the number of servers in the set of servers is one.
 14. A non-transitory computer readable medium storing a program for restoring a set of confidential information items of a first device to a second device, the program executable by at least one processing unit in each server in a set of servers, the program comprising sets of instructions for: generating a public and private key pair; storing the private key and a corresponding access control on the set of servers, the access control allowing access to the private key only to executable code having a same hash value as a hash value of executable code running on the set of server at a time of generating the public and private key pair; receiving a request to restore the set of confidential information items to the second device, the request comprising a first secure object, the first secure object comprising a second secure object encrypted with said private key, the second object comprising a recovery key encrypted with a first user-specific key, the recovery key encrypting the confidential information requested by the second device, the first user-specific key generated by the first device based on answers to a set of user-specific questions; decrypting the first secure object using the private key to access the second secure object, the private key accessible only when a hash value of the executable code running on the set of servers at a time of accessing the private key matches the first hash of the executable code running on the set of servers at the time of generating the private key; receiving a second user-specific key from the second device, the second user-specific key generated based on a same set of user-specific questions used to generate the first user-specific key by the first device; generating a progressively increasing timeout each time the second user-specific key received from the second device does not match the first user-specific key; repeating said receiving the second user-specific key and said generating the progressively increasing timeout as long as the second user-specific key received from the second device does not match the first user-specific key; decrypting the second secure object with the second user-specific key to get the recovery key when the second user-specific key received from the second device matches the first user-specific key; and sending the recovery key to the second device after the second secure object is decrypted.
 15. The non-transitory computer readable medium of claim 14, wherein the set of servers is a first set of servers in a plurality of set of servers, the program further comprising sets of instructions for: assigning each device in a plurality of devices to one set of servers in the plurality of set of servers, the plurality of devices comprising the first and second devices; ignoring a request by the second device to restore a set of confidential information items of a device in the plurality of devices when the request is received by a set of servers other than the first set of servers; and processing the request by the second device to restore a set of confidential information items of a device in the plurality of devices when the request is received by the first set of servers.
 16. The non-transitory computer readable medium of claim 14, wherein the program further comprises sets of instructions for: generating a common key recognizable by all servers in the set of servers; associating an access control to the common key, the access control allowing access to the common key only to executable code having a same hash value as a hash value of the executable code running on the set of servers at the time of generating the common key; and ignoring a request to restore a set of confidential information items to a device when a hash value of the executable code running on the set of servers at the time of receiving the request does not match the hash value of the executable code running on the set of servers at the time of generating the common key.
 17. The non-transitory computer readable medium of claim 14, wherein the program further comprises sets of instructions for: setting a maximum number for the servers in the set of servers; and ignoring a request to restore a set of confidential information items to a device when a number of servers in the set of servers exceeds the maximum number.
 18. The non-transitory computer readable medium of claim 14, wherein the requested set of confidential information comprises a set of class keys of encrypting a set of passwords.
 19. The non-transitory computer readable medium of claim 18, wherein the requested set of confidential information comprises a set of passwords, each password in the set of passwords is associated with a class key, wherein the class keys are encrypted by the recovery key.
 20. The non-transitory computer readable medium of claim 14, wherein the recovery key is a device dependent key that is generated by the first device.
 21. The non-transitory computer readable medium of claim 14, wherein the first secure object is stored in a network storage, wherein the request to restore the set of confidential information items to the second device is received from the network after the network receives a request from the second device to restore the set of confidential information item of the first device to the second device.
 22. The non-transitory computer readable medium of claim 14, wherein (i) encryption of the recovery key by the first user-specific key to create a second secure object and (ii) encryption of the second secure object by the public key of the set of servers to create the first secure object are done by the first device.
 23. The non-transitory computer readable medium of claim 22, wherein the first secure object is sent by the first device to a network for storage, wherein the network sends the request to restore the set of confidential information items to the second device and the first secure object to the set of servers after the network receives the request from the second user device.
 24. A non-transitory computer readable medium storing a program for ensuring integrity of a set of secure servers that provide confidential information items to a plurality of devices, the program executable by at least one processing unit of each server in the set of servers, the program comprising sets of instructions for: generating a common key recognizable by all servers in the set of servers; associating an access control to the common key, the access control allowing access to the common key only to executable code having a same hash value as a hash value of the executable code running on the set of servers at the time of generating the common key; and ignoring a request to send a set of confidential information items to a device when a hash value of the executable code running on the set of servers at the time of receiving the request does not match the hash value of the executable code running on the set of servers at the time of generating the common key.
 25. The non-transitory computer readable medium of claim 24, the program further comprising sets of instructions for: setting a maximum number for the servers in the set of servers; and ignoring a request to restore a set of confidential information items to a device when a number of servers in the set of servers exceeds the maximum number.
 26. The non-transitory computer readable medium of claim 25, the program further comprising a set of instructions for ignoring a request to restore a set of confidential information items to a device when the number of servers in the set of servers is one. 